<?php

namespace App\Admin;

use Illuminate\Database\Eloquent\Model;

class Question extends Model
{
    protected $table='question';
    protected $fillable = [
        'question', 'type', 'select','selectnumber', 'sections','answer', 'intro','level', 'subject', 'points', 'order', 'author','status'
    ];
    public function  types()
    {
        return $this->belongsTo(Questiontypes::class,'type');
    }
    public function authors()
    {
        return $this->belongsTo(Manager::class,'author');
    }
    public function subjects(){
        return $this->belongsTo(Subject::class,'subject');

    }

}
